<%@page import="com.sq.partner.manager.util.StrUtil"%>
<%@page import="java.sql.Struct"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<% String path=request.getContextPath(); String basePath=request.getScheme()+ "://" + request.getServerName() + ":" + request.getServerPort() + path+ "/"; %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<base href="<%=basePath%>">
<title>批改配置新增</title>
<%@ include file="/WEB-INF/jsp/common/common.jsp" %>
<style type="text/css">
.input_text{width:180px;}
.select_1{width:180px;}
#agentType3Table{
	 margin: auto;
}
#agentType4Table{
	 margin: auto;
}
#agentType3Table td{
	border: 1px solid #bbcddb;
	height:15px; 
	line-height:15px;
}
#agentType4Table td{
	border: 1px solid #bbcddb;
	height:15px; 
	line-height:15px;
}
	#agentInfoRela6Table td{
	   text-align: center;
	}
</style>
<script src="js/jquery.validate.js" type="text/javascript" ></script>
<script src="js/jquery.divbox.js" type="text/javascript"></script>
<script src="js/json2.js" type="text/javascript"></script>
<script type="text/javascript">
var emailMap=new Map();
var channelFlag="";
var copAdd="";
//------------------------------------------ 初始化本页面 开始----------------------------------------------
//统一 关闭  窗口
function closeCurrentDIV(obj){
	$("#"+obj).CloseDiv();
}
$(function(){
	channelFlag=${channelFlag};
	copAdd=${copAdd};
	if(channelFlag==true){
	$("#edrRsn").find("option[value='${edrnoPower.edrRsn}']").attr("selected",true);  
	$("#isAllRefund").find("option[value='${edrnoPower.isAllRefund}']").attr("selected",true);
	$('#erdRsnZx').find("option[value='${edrnoPower.erdRsnZx}']").attr("selected",true);
	$('#isBan').find("option[value='${edrnoPower.isBan}']").attr("selected",true);
	$('#isUpdateSeeMoney').find("option[value='${edrnoPower.isUpdateSeeMoney}']").attr("selected",true);
	$('#isReceipt').find("option[value='${edrnoPower.isReceipt}']").attr("selected",true);
	$('#isEdeno').find("option[value='${edrnoPower.isEdeno}']").attr("selected",true);
	$('#isSms').find("option[value='${edrnoPower.isSms}']").attr("selected",true);
	$('#smsReceiver').find("option[value='${edrnoPower.smsReceiver}']").attr("selected",true);
	$('#smsTemplate').find("option[value='${edrnoPower.smsTemplate}']").attr("selected",true);
	$('#payEinv').find("option[value='${edrnoPower.payEinv}']").attr("selected",true);
	$('#isEinv').find("option[value='${edrnoPower.isEinv}']").attr("selected",true);
	$('#isInsuEinv').find("option[value='${edrnoPower.isInsuEinv}']").attr("selected",true);
	}
	edrRsnChange();
})
//打开合作伙伴 div 方法
function openThisDiv(divObj,pageIndex,obj){
	$('#channelCode').val('');
	$('#channelName').val('');
	$("#"+obj.id).blur();
	queryTradPartners(pageIndex);
}
//拼接页面查询参数  查询合作伙伴
function mergePartnerParams(pageIndex){
	var size = 8;
	var channelCode = $('#channelCode').val();
	var channelName = $('#channelName').val();
	queryPartner({pageIndex:pageIndex,size:size,channelCode:channelCode,channelName:channelName});
}

//查询 合作伙伴
function queryTradPartners(pageIndex){
	mergePartnerParams(pageIndex);
}
function queryPartner(param){
	$.openLoading();
	$.ajax({
		url : "noCarInsure/loadChannelInfo1",
		type : 'POST',
		async : true,
		data:param,
		dataType:'json',
		success:function(partnerPage){
			$.closeLoading();
			if($.validate(partnerPage))return;
					var radioObj ="<input class='input_fxk' name='partnerradio' type='radio' value=''>";
					var fieldNames = "channelCode@TDH,channelCode,channelName,clientNo@TDH,thirdPlan@TDH,channelFlag@TDH";
					var tableContent = creatTable1(fieldNames,partnerPage,radioObj);
					var tableObj = $("#TradPartnerTable");
					tableObj.find("tbody").remove();
					tableObj.append(tableContent);
					var strPage = creatChannelPage2(param.pageIndex,6,partnerPage.maxPage,"16");
					var pageDIV = $("#TradPartnerPageDIV");
					pageDIV[0].innerHTML="";
					pageDIV.append(strPage);
					$('#tradPartnerDiv').OpenDiv();
					bindredio();
			}
	});
}  
//点击“确定”按钮，选择合作伙伴
function choosePartner(){
	var selectedPartner = $("input[name='partnerradio']:checked");
	if(selectedPartner.length==0){
		$.message("error", "请选择一个合作伙伴");
		return;
	}
	var pno = selectedPartner.parent().parent().children(" td:eq(1)").html();
	$('#partnerNo').val(pno);
	closeCurrentDIV('tradPartnerDiv');
}

function queryPlan(pageCount){
	var planCode=$('#planCode').val();
	var planName=$('#planName').val();
	var partnerNo=$('#partnerNo').val();
	if(!$('#partnerNo').val()){
		$.message("error", "请先选中合作伙伴代码");
		return;
	} 
	loadPlan({size:6,current:pageCount,planCode:planCode,planName:planName,partnerNo:partnerNo});
}

function openPlanDiv(){
	fvreset()
	queryPlan(1);
/* 	$('#addPlanDiv').OpenDiv() */
}
function chooseReceiptType(){
	var isReceipt=$('#isReceipt').val();
	if(isReceipt=='Y'){
		$('#receiptTypeDiv').show();
	}else{
		$('#receiptTypeDiv').hide();
	}
}
function chooseisEdeno(){
	var isEdeno=$('#isEdeno').val();
	if(isEdeno=='Y'){
		$('#edrnoTypeDiv').show();
	}else{
		$('#edrnoTypeDiv').hide();
	}
}
function changeisSms(){
	var isSms=$('#isSms').val();
	if(isSms=='Y'){
		$('#smsReceiverDiv').show();
	}else{
		$('#smsReceiverDiv').hide();
		$('#smsReceiver').val("");
	}
}
function changeType(){
	 chooseReceiptType();
	 chooseisEdeno();
	 changeisSms();
	changeisEinv();
}

function changeisEinv(){
	var isEinv=$('#isEinv').val();
	if(isEinv=='Y'){
		$('#isEinvTypeDiv').show();
	}else{
		$('#isEinvTypeDiv').hide();
	}
}
function edrRsnChange(){
	var edrRsn=$('#edrRsn').val();
	if(edrRsn=='0'||edrRsn=='1'||edrRsn=='4'||edrRsn=='99'){
		$("#erdRsnZx").val("");
		$("#erdRsnZx").attr("disabled",true);
		$("#erdRsnZx").css({"background-color": "#ccc"});
		$("#isBan").attr("disabled",true);
		$("#isBan").val("N");
		$("#isBan").css({"background-color": "#ccc"});
		$("#isUpdateSeeMoney").attr("disabled",true);
		$("#isUpdateSeeMoney").css({"background-color": "#ccc"});
		$("#isReceipt").attr("disabled",true);
		$("#isReceipt").val("N");
		$("#isReceipt").css({"background-color": "#ccc"});
		$("#isEdeno").val("N");
		$("#isEdeno").attr("disabled",true);
		$("#isEdeno").css({"background-color": "#ccc"});
		$("#isEinv").attr("disabled",true);
		$("#isEinv").css({"background-color": "#ccc"});
		$("#isEinv").val("N");
		$("#maxCancelDay").attr("disabled",false);
		$("#maxCancelDay").css({"background-color": ""});
		if(edrRsn=='1'){
			$('#isAllRefundDiv').show();
			$("#isSms").val("N");
			$("#isSms").attr("disabled",true);
			$("#isSms").css({"background-color": "#ccc"});
		}else{
			$('#isAllRefund').val("0");
			$('#isAllRefundDiv').hide();
			if(edrRsn=='4'||edrRsn=='99'){
				$("#maxCancelDay").attr("disabled",true);
				$("#maxCancelDay").css({"background-color": "#ccc"});
				$("#isSms").val("N");
				$("#isSms").attr("disabled",true);
				$("#isSms").css({"background-color": "#ccc"});
			}else{			
				$("#isSms").attr("disabled",false);
				$("#isSms").css({"background-color": ""});
			}
		}
	}else if(edrRsn=='14'){
		$('#isAllRefundDiv').hide();
		$("#erdRsnZx").attr("disabled",false);
		$("#erdRsnZx").css({"background-color": ""});
		$("#isBan").attr("disabled",false);
		$("#isBan").css({"background-color": ""});
		$("#isUpdateSeeMoney").attr("disabled",false);
		$("#isUpdateSeeMoney").css({"background-color": ""});
		$("#isReceipt").attr("disabled",false);
		$("#isReceipt").css({"background-color": ""});
		$("#isEdeno").attr("disabled",false);
		$("#isEdeno").css({"background-color": ""});
		$("#isEinv").attr("disabled",false);
		$("#isEinv").css({"background-color": ""});
		$("#maxCancelDay").val("");
		$("#maxCancelDay").attr("disabled",true);
		$("#maxCancelDay").css({"background-color": "#ccc"});
		$('#isAllRefundDiv').hide();
		$("#isSms").val("N");
		$("#isSms").attr("disabled",true);
		$("#isSms").css({"background-color": "#ccc"});
	}
	changeType();
}

function fvreset(){
	$('#planCode').val('');
	$('#planName').val('');
}
function loadPlan(param){
	$.openLoading();
	$.ajax({
		url : "edrnoConfiger/queryNocarPlanList",
		type : 'POST',
		async : true,
		dataType:'json',
		data:param,
		success : function(page) {
			$.closeLoading();
			if($.validate(page))return;
			var firstbutton ="<input class='input_fxk' name='planTemple' type='radio' value=''>";
			var tableContent = creatTable1("PLAN_CODE,PLAN_NAME",page,firstbutton,null);
			var tableObj = $("#productTempletTable");
			tableObj.find("tbody").remove();
			tableObj.append(tableContent);
			
			var strPage = creatChannelPage(page.current,6,page.maxPage,"91");
			var pageDIV = $("#productTempletpageDIV");
			pageDIV[0].innerHTML="";
			pageDIV.append(strPage);
			 bindredio(); 
			$("#addPlanDiv").OpenDiv();
		}
	});
}
function bindredio(){
	$("input[name='partnerradio']").click(function(){
		$("input[name='partnerradio']").parent().parent().removeClass("table_highlighter");
		$(this).parent().parent().addClass("table_highlighter");

   	});
	$("input[name='planTemple']").click(function(){
		$("input[name='planTemple']").parent().parent().removeClass("table_highlighter");
		$(this).parent().parent().addClass("table_highlighter");

   	});
}
//点击“确定”按钮，选择合作伙伴
function choosePlan(){
	var selectedPartner = $("input[name='planTemple']:checked");
	if(selectedPartner.length==0){
		$.message("error", "请选择一个方案");
		return;
	}
	var planNo = selectedPartner.parent().parent().children(" td:eq(1)").html();
	$('#productCode').val(planNo);
	closeCurrentDIV('addPlanDiv');
}

function checkAndEdrno(){
	var id=$('#hideID').val();
	var partnerNo=$('#partnerNo').val();
	var productCode=$('#productCode').val();
	var edrRsn=$('#edrRsn').val();
	var erdRsnZx=$('#erdRsnZx').val();
	var isBan=$('#isBan').val();
	var isEdeno=$('#isEdeno').val();
	var isReceipt=$('#isReceipt').val();
	var isSms=$('#isSms').val();
	var smsReceiver=$('#smsReceiver').val();
	var smsTemplate=$('#smsTemplate').val();
	var isEinv=$('#isEinv').val();
	var isInsuEinv='';
	var payEinv='';
	if(isEinv=='Y'){
		isInsuEinv=$('#isInsuEinv').val();
		payEinv=$('#payEinv').val();
	}
	var maxCancelDay=$('#maxCancelDay').val();
	var isUpdateSeeMoney=$('#isUpdateSeeMoney').val();
	var isAllRefund=$('#isAllRefund').val();
	var receiptType=$('#receiptType').val();
	if(partnerNo==''){
		$.message("error","合作伙伴不可为空");
		return;
	}
	if(maxCancelDay==null){
		maxCancelDay="";
	}
	if(channelFlag==true&&copAdd!="1"){
		excuteUpdate({id:id,partnerNo:partnerNo,productCode:productCode,edrRsn:edrRsn,erdRsnZx:erdRsnZx,isBan:isBan,isEdeno:isEdeno,
			isReceipt:isReceipt,isSms:isSms,smsReceiver:smsReceiver,smsTemplate:smsTemplate,isEinv:isEinv,isInsuEinv:isInsuEinv,
			payEinv:payEinv,maxCancelDay:maxCancelDay,isUpdateSeeMoney:isUpdateSeeMoney,isAllRefund:isAllRefund,receiptType:receiptType});
	}else{
		excuteAdd({partnerNo:partnerNo,productCode:productCode,edrRsn:edrRsn,erdRsnZx:erdRsnZx,isBan:isBan,isEdeno:isEdeno,
			isReceipt:isReceipt,isSms:isSms,smsReceiver:smsReceiver,smsTemplate:smsTemplate,isEinv:isEinv,isInsuEinv:isInsuEinv,
			payEinv:payEinv,maxCancelDay:maxCancelDay,isUpdateSeeMoney:isUpdateSeeMoney,isAllRefund:isAllRefund,receiptType:receiptType});
	}
}

//执行修改
function excuteUpdate(param){
	$.openLoading();
	$.ajax({
		url : "edrnoConfiger/updateEdrno",
		type : 'POST',
		async : true,
		data:param,
		dataType:'json',
		success:function(data){
			$.closeLoading();
			if($.validate(data))return;
			goBack('edittrue');
		}
	});
}
//执行修改
function excuteAdd(param){
	$.openLoading();
	$.ajax({
		url : "edrnoConfiger/saveEdrno",
		type : 'POST',
		async : true,
		data:param,
		dataType:'json',
		success:function(data){
			$.closeLoading();
			if($.validate(data))return;
			goBack('addtrue');
		}
	});
}

//返回按钮
function goBack(a){
	this.location.href = "<%=path%>/edrnoConfiger/list?flag="+a;
}
function showdiv(){
	if (document.getElementById("edrno_div").style.display=="block") {
		document.getElementById("edrno_div").style.display="none";  
	}else{
		document.getElementById("edrno_div").style.display="block";
		}
	}
function showRecdiv(){
	if (document.getElementById("receipt_div").style.display=="block") {
		document.getElementById("receipt_div").style.display="none";  
	}else{
		document.getElementById("receipt_div").style.display="block";
		}
	}
function maxCancelDayCheck(){
	if($('#maxCancelDay').val()!=""){
		var minDelayDayReg = new RegExp("^(0|[1-9][0-9]*)$");
		var delayflag = minDelayDayReg.test($('#maxCancelDay').val());
		if(!delayflag) $.message("error","最晚起保后批改天数必须是大于等于0的整数");
	}
}
</script>
</head>
<body>
<c:if test="${not empty edrnoPower.id }">
<input type="hidden" value="${edrnoPower.id }" id="hideID">
	      <div class="current">
           <table class="current_table_1">
              <tbody>
                <tr class="f2">
                  <td>
                    <img src="./images/current_1.jpg">
                  </td>
                  <td class="current_table_1_td">
                    <img src="images/current_1.png">&nbsp;您现在的位置：&nbsp;
                      <span style=" color:#136bab; ">财险产品管理
                         <span style="padding:0 5px; font-weight:bold; line-height:28px;">&gt;</span>财险批改配置
                         <span style="padding:0 5px; font-weight:bold; line-height:28px;">&gt;</span>批改配置编辑
                      </span>
                  </td>
                  <td><img src="./images/current_3.jpg"></td>
              </tr>
           </tbody>
         </table>
      </div>
</c:if>
<c:if test="${empty edrnoPower.id }">
	      <div class="current">
           <table class="current_table_1">
              <tbody>
                <tr class="f2">
                  <td>
                    <img src="./images/current_1.jpg">
                  </td>
                  <td class="current_table_1_td">
                    <img src="images/current_1.png">&nbsp;您现在的位置：&nbsp;
                      <span style=" color:#136bab; ">财险产品管理
                         <span style="padding:0 5px; font-weight:bold; line-height:28px;">&gt;</span>财险批改配置
                         <span style="padding:0 5px; font-weight:bold; line-height:28px;">&gt;</span>批改配置新增
                      </span>
                  </td>
                  <td><img src="./images/current_3.jpg"></td>
              </tr>
           </tbody>
         </table>
      </div>
</c:if>
			<form id="inputForm" >
	        <table class="table_05">
	              <tbody>
		              <tr>
			              <c:if test="${not empty edrnoPower.id }">
			                  <td colspan="4" style=" font-size:12px; font-weight:bold; text-align:left;color:#3876bf; line-height:17px; background-image:url(images/centent_1.jpg)">批改配置编辑</td>
			              </c:if>
			              <c:if test="${empty edrnoPower.id }">
			                  <td colspan="4" style=" font-size:12px; font-weight:bold; text-align:left;color:#3876bf; line-height:17px; background-image:url(images/centent_1.jpg)">批改配置新增</td>
			              </c:if>
		              </tr>
		              <tr>
		              	  <th>合作伙伴：</th>
		                  <td>
		                  	<input name="partnerNo" id="partnerNo" type="text" readonly="readonly" style=" background-color: #ccc;" class="input_text" value="${edrnoPower.partnerNo }"/><span class="red">*</span>&nbsp;
		                  	<c:if test="${empty edrnoPower.partnerNo}">
		                  		<input type="button"  class="input_button_2" id="searchPartnerBtn" value="请选择" onClick="openThisDiv('tradPartnerDiv',1,this)"/>
		                  	</c:if>
		                  	<c:if test="${not empty edrnoPower.partnerNo}">
		                  		<input type="button" disabled="disabled" id="searchPartnerBtn" value="请选择" onClick="openThisDiv('tradPartnerDiv',1,this)"/>
		                  	</c:if>
		                  </td>
		                  <th>方案号：</th>
		                  <td>
							<input name="productCode" id="productCode" type="text" readonly="readonly" style=" background-color: #ccc;" class="input_text" value="${edrnoPower.productCode }"/>&nbsp;
		                  		<input type="button"  class="input_button_2" id="searchPlanBtn" value="请选择" onClick="openPlanDiv()"/>
						</td>
		              </tr>
		               <tr>
		              	  <th>批改类型：</th>
		                  <td>
		                  <div style="float:left;">
		                  		<select id="edrRsn" name="edrRsn" onchange="edrRsnChange()" class="select_1 valid" style="visibility: visible;">
	 								<option value="0">保单注销</option>
		                  			<option value="1">保单退保</option>
		                  			<option value="4">一般批改</option>
		                  			<option value="14">清单批改（有子项）</option>
		                  			<option value="99">综合批改</option>
		                  		</select>
		                  </div>
		                  <div id="isAllRefundDiv"  style="float:left; display: none">
		                  		&nbsp;是否全额退保：<select id="isAllRefund" style="width: 50px;">
		                  			<option value="1">是</option>
		                  			<option value="0" selected="selected">否</option>
		                  		</select>
		                  	</div>
		                  </td>
		                  <th>批改子项：</th>
		                  <td>
		                  <div id="erdRsnZxDiv" style="float:left;">
		                  	<select id="erdRsnZx" name="erdRsnZx" class="select_1 valid" style="visibility: visible;">
			                  	 <option value="" >批改类型</option>
			                  	 <option value="00" >批减清单信息</option>
	                  			 <option value="01" >批增清单信息</option>
			                  	 <option value="02" > 批换清单信息</option>
	                  		</select>
	                  		</div>
	                  		 <div id="isBanDiv"  style="float:left;">
	                  		&nbsp;禁止批改：<select id="isBan" style="width: 50px;">
		                  			<option value="Y">是</option>
		                  			<option value="N" selected="selected">否</option>
		                  		</select>
		                  		</div>
		                  </td>
	              </tr>
		              <tr id="isUpdateSeeMoney11">
		                  <th>是否见费批改：</th>
		                  <td>
		                  <select id="isUpdateSeeMoney" class="select_1 valid" style="visibility: visible;">
		                  		<option value="0">是</option>
		                  		<option value="1" selected="selected">否</option>
		                  </select>
						</td>
		                  <th>最晚起保后批改天数：</th>
		                  <td>
		                  <input id="maxCancelDay" type="text"  maxlength="10" onchange="maxCancelDayCheck()" class="input_text" value="${edrnoPower.maxCancelDay }"/>
		                  </td>
		              </tr>
		              <tr id="AllDiv">
						  <th>是否支持回执：</th>
		                 <td>
		                  <div style="float:left;">
		                  		<select  name="isReceipt" id="isReceipt" onchange="chooseReceiptType()" class="select_1 valid" style="visibility: visible; width: 80px"><option value="N">否</option><option value="Y">是</option></select>
		                  </div>
		                  <div id="receiptTypeDiv"  style="display:none; ">
			              	&nbsp;回执类型：<select id = "receiptType" class="select_1 valid" style="width: 100px;">
			                 <option value="">回执模板</option>
			                  </select>
			                 <a onclick="showRecdiv()" href="javascrript:void(0)" style="color: red;">查看模板示例图</a>
			              </div>
		                  </td>
		                   <th>是否电子批单：</th>
		                 <td>
		                  <div style="float:left;">
		                  		<select name="isEdeno" id="isEdeno" onchange="chooseisEdeno()" class="select_1 valid" style="visibility: visible;width: 80px"><option value="N">否</option><option value="Y">是</option></select>
		                  </div>
		                  <div id="edrnoTypeDiv"  style="display:none;" >
			              	&nbsp;电子批单类型：<select id = "edrnoType" class="select_1 valid" style=" width: 110px;">
			              		<option value="P04G2">04G2批单模板</option>
			                  </select>
			                 <a onclick="showdiv()" href="javascrript:void(0)" style="color: red;">查看模板示例图</a>
			              </div>
			              </td>
				  		</tr>
				  		<tr id="AllDiv" >
		                   <th>是否批改短信：</th>
		                 <td colspan="4">
		                 	  <div style="float: left;">
		                  		<select name="isSms" id="isSms" onchange="changeisSms()" class="select_1 valid" style="visibility: visible;width:80px;">
			                  		<option value="N">否</option>
			                  		<option value="Y">是</option>
		                  		</select>
		                  	  </div>
		                  	  <div id="smsReceiverDiv"  style="display:none;">
		                  	  <div style="float: left;">
		                  		&nbsp;接收人：<select name="smsReceiver"  id="smsReceiver" class="select_1 valid" style="visibility: visible;width: 100px;"><option value="">----请选择---</option><option value="0">投保人</option><option value="1">被保人</option></select>
		                  	  </div>
		                  	  <div  style="float: left;">
		                  		&nbsp;短信模板：
		                  		<select name="smsTemplate"  id="smsTemplate" onchange="changeIsCacelTemplate()" class="select_1 valid" style="visibility: visible;width:100px;">
		                  			<option value="">----请选择----</option>
		                  			<option value="PN0201">PN0201-承保短信-参数主险名称,批单号</option>
		                  			<option value="PN0202">PN0202-承保短信-参数产品名称,批单号</option>
		                  		</select>
			                  </div>
			                  </div>
		                  </td>
				  		</tr>
		              <tr id="AllDiv" >
		                  <th>是否电子发票：</th>
		                  <td colspan="4">
		                   <div style="float:left;">
		                  		<select name="isEinv" id="isEinv" onchange="changeisEinv()" class="select_1 valid" style="visibility: visible;width:80px;"><option value="N">否</option><option value="Y">是</option></select>
		                  </div>
		                  <div id="isEinvTypeDiv" style="float:left;display:none;">
		                   <div  style="float:left;">      
		                  		&nbsp;购&nbsp;方：<select name="payEinv" id="payEinv" class="select_1 valid" style="visibility: visible;width:100px;"><option value="1">投保人</option><option value="2">被保人</option><option value="3">接口传入</option></select>
		                  </div>
		                  <div   style="float:left;">
			              	&nbsp;是否跟单发票：<select id = "isInsuEinv" class="select_1 valid" style="visibility: visible;vertical-align: middle; width: 100px;">
			                   <option value="1">是</option>
			                   <option value="0">否</option>
			                  </select>
			              </div>
			              </div>
		                  </td>
		              </tr>
		              <tr>
		              	<th colspan="2"> 
		              	<div id="receipt_div" style="display:none;"><img src="./images/receipt.png"  width="500" height="700"/></div>
		      			</th>
		              	<th colspan="2"> 
		              	<div id="edrno_div" style="display:none;"><img src="./images/edrno.png"  width="500" height="700"/></div>
		      			</th>
		              </tr>
	           	  </tbody>
	         </table> 
	         <div align="center">
	             <input class="input_button_3" name="" id="sbtn" type="button" onclick="checkAndEdrno()" value="保存">&nbsp;&nbsp;
		         <input class="input_button_3" name="" type="button" value="返回" onclick="goBack()">
	         </div>
	         </form>
		      </div>    
	</div>
	
	
	<!--   	选择 合作伙伴 div-->
  		<div id="tradPartnerDiv" style="display:none;width:80%;">
  		<input type="hidden" id="row_num" name="row_num" value="0"/>
			<div class="table_title_div">
					<table class="table_title" style='width:100%;height: 20px;'>
						<tr>
						<td width="10%"></td>
						<td width="80%" id="interfaceName"></td>
						<td width="10%" align="right"><img src="./images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('tradPartnerDiv')"/></td>
						</tr>
					</table>
			</div>
		<table class="table_02" id="table" style="height:180px;" align="center">
			<tr>
				<td>
					<table class="search_table">
						<tr height="30px">
							<td colspan="3" style="text-align:center">
							 合作伙伴代码：<input name="txt3"  id="channelCode"  type="text" class="input_text" value="" >&nbsp;&nbsp;
							 合作伙伴名称：<input name="txt3" id="channelName"  type="text" class="input_text" value="">&nbsp;&nbsp;
								       <input type="button"  class="input_button_1" id="searchBtn" value="查询" onClick="queryTradPartners(1)"/>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table id="TradPartnerTable"  class="content_table_1">
						<thead>
							<tr class="f1">
			                  <th style="width:5%">选择</th>
			                  <th style="width:10%">合作伙伴代码</th>
			                  <th style="width:20%">合作伙伴名称</th>
			              	</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
					<div id="TradPartnerPageDIV"  class="page"></div>
				</td>
			</tr>
		</table>
		<div align="center" >
		  <input type="button" id="saveRoleBtn" value="确定" onclick="choosePartner()" class="input_button_3"/>&nbsp;&nbsp;&nbsp;
		  <input type="button" value="取消" onclick="closeCurrentDIV('tradPartnerDiv')" class="input_button_3"/>
		</div>
	</div>	
	
	<div id="addPlanDiv"  style="display:none;width:80%;">
			<input type="hidden" id="row_num" name="row_num" value="0"/>
			<div class="table_title_div">
					<table class="table_title" style='width:100%;'>
						<tr>
						<td width="10%"></td>
						<td width="80%" id="interfaceName"></td>
						<td width="10%" align="right"><img src="<%=path%>/images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('addPlanDiv')"/></td>
						</tr>
					
					</table>
			</div>
		<form id="inputForm" action="save.jhtml" method="post" enctype="multipart/form-data">
			
			<table class="table_02" id="addtempletTable" style="height:180px; " align="center" >
				<tbody>
					<tr>
						<td>
							<table class="search_table">
								<tbody>
									<tr height="30px">
										<td width="40%" height="30px">方案代码：
											<input name="txt3" id="planCode" type="text" class="input_text" value="" style="width:220px;">
										</td>
										<td width="40%" height="30px">方案名称：
											<input name="txt3" id="planName" type="text" class="input_text" value="" style="width:220px;">
										</td>
										<td width="20%" height="30px">
										   <input type="button" class="input_button_1" id="searchBtn" value="查询" onclick="queryPlan(1)">&nbsp;
										   <input type="button" class="input_button_1" id="searchBtn" value="重置" onclick="fvreset()">
										</td>
									</tr>	
								</tbody>
							</table>
						</td>
					</tr>
					<tr>
						<td>
							<table id="productTempletTable"  class="content_table_1">
								<thead>
									<tr class="f1">
					                  <th style="width:5%">选择</th>
					                  <th style="width:15%">方案代码</th>
					                  <th style="width:20%">方案名称</th>
					              	</tr>
								</thead>
								<tbody>
								</tbody>
							</table>
							<div id="productTempletpageDIV"  class="page"></div>
						</td>
					</tr>
				</tbody>
			</table>
			<div align="center">
			 <input class="input_button_3" name="" type="button" onclick="choosePlan()" value="保存">&nbsp;&nbsp;
	         <input class="input_button_3" name="" type="button" onclick="closeCurrentDIV('addPlanDiv')" value="取消">
			</div>
		</form>
	</div>
</body>
</html>